<?php


namespace app\common\model;


class Catetype extends  BaseModel
{
    //自动写入时间
    protected $autoWriteTimestamp = true;

    /**
     * 获取分类列表
     * @return \think\Collection|\think\Model[]
     */
    public function catetypeList()
    {
        return $this->where('status',1)->select();
    }

    public  function updateCatetype()
    {
        $param = request()->param();
        return $this->allowField(true)->save($param,['id'=>$param['id']]);
    }
}